import React, { useMemo } from "react";
import ThemeContext from "../ThemeContext";
//方案一
export default function VoteMain() {
    return <ThemeContext.Consumer>
        {context => {
            let {supNum,oppNum} = context
            return <div className="main">
                <p>支持人数:{supNum}</p>
                <p>反对人数:{oppNum}</p>
            </div>
        }}
    </ThemeContext.Consumer>
}